home *** CD-ROM | disk | FTP | other *** search
- To the one known as Garfield,
-
- > > As a substitute for select...case I don't think either is good. They're
- > > both messy. Try this instead:
- > > If AGE<10
- > > Print "You are less than 10 years old."
- > > else if AGE=21
- > > Print "Hey!! Now you can drink alcohol in the U.S.!!"
- > > else
- > > Print "WOW, you're OVER 21!!"
- > > endif
- > > Smallest, and tidiest in my humble opinion.
- > > Is my approach good enough in the meantime?
- > Well, problem is this won't work. First, you need to match every
-
- <Cough> Yes it will.
-
- > If with an End If and second, the logic is not the same. To write
- > it in the above style, so it will work in AMOS while retaining the
- > original logic, you'd need to do something like this:
- > If AGE<10
- > Print "You are less than 10 years old."
- > Else If AGE=21
- > Print"Hey!! Now you can drink alcohol in the U.S.!!"
- > Else If AGE>21
- > Print "WOW, you'r OVER 21!!"
- > End If
- > End If
- > End If
-
- What ARE you doing ?
-
- Amos explicitly implments "else if".
-
- cyagain.
-
-
-
- _ _ _ _ _ _ |
- |_> |_| |_| |\ | |_ | | | / | | "As if !"
- |_> | \ | | | \| |_ |_ |_| \_ . |
- |
- --------------+---------------
- http://www.mirex.demon.co.uk
- Member: IAPA & Team *AMOS*
-
-